/**
* 电影院的操作
* */

import base from '@/plugins/baseURL'; // 导入接口域名列表
import axios from '@/plugins/http'; // 导入http中创建的axios实例
import qs from 'qs'; // 参数转化

const cinema={
    searchCinemaByCon(params){
        return axios.post(`${base.dev}/cinema/searchCinema`,qs.stringify(params));
    },
    deleteCinemaById(cinemaId){
        let data = {
            cinemaId: cinemaId,
        };
        // console.log(data);
        // console.log(qs.stringify(data));
        return axios.post(`${base.dev}/cinema/removeCinema`,qs.stringify(data));
    },
    addCinemaFormData(formData){
        let config = {
            headers: {
                "Content-Type": "multipart/form-data"
            }
        };
        return axios.post(`${base.dev}/cinema/addCinema`,formData,config);
    },
    updateCinemaFormData(formData){
        let config = {
            headers: {
                "Content-Type": "multipart/form-data"
            }
        };
        return axios.post(`${base.dev}/cinema/updateCinema`,formData,config);
    },

}

export default cinema;